# toTensor and Lambda
import torch
from torchvision import datasets
from torchvision.transforms import ToTensor, Lambda

ds = datasets.FashionMNIST(
    root="data",
    train=True,
    download=True,
    transform=ToTensor(),
    target_transform=Lambda(lambda y: torch.zeros(10, dtype=torch.float).scatter_(0, torch.tensor(y), value=1))
)

# toTensor converts into a FloatTensor. and scales the image’s pixel intensity values in the range [0., 1.]
# lambda:define a oneself function and convert(example is one-hot)
